package com.azt.api.pojo;

import com.azt.pojo.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

@Table(name = "u_msg_user")
public class MsgUser extends BaseEntity {
    /**
     * 用户Id
     */
    private Integer userId;

    /**
     * 消息类别（取自数据字典）
     */
    private Integer msgType;

    /**
     * 消息标题
     */
    private String msgTitle;

    /**
     * 消息链接
     */
    private String msgUrl;

    /**
     * 是否查看（1是0否）
     */
    private Integer ifRead;

    /**
     * 站内信是否发送（1发送0不发送）
     */
    private Integer ifMail;

    /**
     * 手机是否发送（1发送0不发送）
     */
    private Integer ifMobile;

    /**
     * 邮箱是否发送（1发送0不发送）
     */
    private Integer ifEmail;

    /**
     * 查看时间
     */
    private Date readtime;

    /**
     * 是否延迟发送
     */
    private Integer delay;

    /**
     * 排序时间
     */
    private Date sorttime;

    /**
     * 手机
     */
    private String mobile;

    /**
     * 邮箱
     */
    private String email;


    /**
     * 站内信消息内容
     */
    private String msgContent;

    /**
     * 手机消息内容
     */
    private String mobileContent;

    /**
     * 邮箱消息内容
     */
    private String emailContent;

    public MsgUser(Integer id) {
        setId(id);
    }

    public MsgUser() {

    }

    public MsgUser(Integer userId, Integer msgType, String msgTitle, String msgContent, String msgUrl, Integer ifMail, Integer ifMobile, Integer ifEmail) {
        this.userId = userId;
        this.msgType = msgType;
        this.msgTitle = msgTitle;
        this.msgContent = msgContent;
        this.msgUrl = msgUrl;
        this.ifMail = ifMail;
        this.ifEmail = ifEmail;
        this.ifMobile = ifMobile;
        this.setCreatetime(new Date());
        this.ifRead = 0;
    }

    public MsgUser(Integer userId, Integer msgType, String msgTitle, String msgUrl) {
        this.userId = userId;
        this.msgType = msgType;
        this.msgTitle = msgTitle;
        this.msgUrl = msgUrl;
        this.ifEmail = 0;
        this.ifMobile = 0;
        this.ifMail = 0;
        this.setCreatetime(new Date());
        this.ifRead = 0;
    }

    @Transient
    private String msgName;


    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getMsgType() {
        return msgType;
    }

    public void setMsgType(Integer msgType) {
        this.msgType = msgType;
    }

    public String getMsgTitle() {
        return msgTitle;
    }

    public void setMsgTitle(String msgTitle) {
        this.msgTitle = msgTitle;
    }

    public String getMsgUrl() {
        return msgUrl;
    }

    public void setMsgUrl(String msgUrl) {
        this.msgUrl = msgUrl;
    }

    public Integer getIfRead() {
        return ifRead;
    }

    public void setIfRead(Integer ifRead) {
        this.ifRead = ifRead;
    }

    public Integer getIfMail() {
        return ifMail;
    }

    public void setIfMail(Integer ifMail) {
        this.ifMail = ifMail;
    }

    public Integer getIfMobile() {
        return ifMobile;
    }

    public void setIfMobile(Integer ifMobile) {
        this.ifMobile = ifMobile;
    }

    public Integer getIfEmail() {
        return ifEmail;
    }

    public void setIfEmail(Integer ifEmail) {
        this.ifEmail = ifEmail;
    }

    public Date getReadtime() {
        return readtime;
    }

    public void setReadtime(Date readtime) {
        this.readtime = readtime;
    }

    public Integer getDelay() {
        return delay;
    }

    public void setDelay(Integer delay) {
        this.delay = delay;
    }

    public Date getSorttime() {
        return sorttime;
    }

    public void setSorttime(Date sorttime) {
        this.sorttime = sorttime;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getMsgContent() {
        return msgContent;
    }

    public void setMsgContent(String msgContent) {
        this.msgContent = msgContent;
    }

    public String getMobileContent() {
        return mobileContent;
    }

    public void setMobileContent(String mobileContent) {
        this.mobileContent = mobileContent;
    }

    public String getEmailContent() {
        return emailContent;
    }

    public void setEmailContent(String emailContent) {
        this.emailContent = emailContent;
    }

    public String getMsgName() {
        return msgName;
    }

    public void setMsgName(String msgName) {
        this.msgName = msgName;
    }
}
